package com.itheima.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.itheima.pojo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class PojectException {

    @ExceptionHandler
    public Result EE(RuntimeException e){
        return new Result(false,e.getMessage(),null);
    }
}
